﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Net;
using System.IO;

namespace OuSuisJeWebRole
{
    public partial class CreateEnigma : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            if (FileUpload1.HasFile)
            {
                HttpWebRequest req = (HttpWebRequest)HttpWebRequest.Create("http://127.0.0.1/OuSuisJe/Enigmas" + "/UploadFile/1234567891");
                req.Method = "POST";
                //req.ContentType = FileUpload1.PostedFile.ContentType;
                Stream reqStream = req.GetRequestStream();
                //reqStream = FileUpload1.PostedFile.InputStream;
                FileUpload1.FileContent.CopyTo(reqStream);
                req.GetResponse();
            }
        }
    }
}